<script type="text/javascript">
    $(function() {
        $("a.edit").button({
            icons: {
                primary: "ui-icon-pencil"
            }
        });
        
        $("a.back").button({
            icons: {
                primary: "ui-icon-circle-arrow-w"
            }
        });
        
        $("a.show-nominations").button({
            icons: {
                primary: "ui-icon-comment"
            }
        });
    });
</script>
<?php if ($sf_user->hasFlash('notice')): ?>
  <div class="flash_notice"><?php echo $sf_user->getFlash('notice') ?></div>
<?php endif ?>
<table class="span-24 append-bottom">
    <tr class="span-24">
        <th class="span-6">Nombre:</th>
        <td class="span-18 last"><?php echo $candidate->getName() ?></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Descripción:</th>
        <td class="span-18 last"><?php echo $candidate->getDescription() ?></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Thumbnail:</th>
        <td class="span-18 last"><img src="/uploads/<?php echo $candidate->getThumb() ?>"/></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Imagen:</th>
        <td class="span-18 last"><img src="/uploads/<?php echo $candidate->getImage() ?>"/></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Email:</th>
        <td class="span-18 last"><a target="_blank" href="mailto:<?php echo $candidate->getEmail() ?>"><?php echo $candidate->getEmail() ?></a></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Dirección:</th>
        <td class="span-18 last"><?php echo $candidate->getAddress() ?></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Twitter:</th>
        <td class="span-18 last">
            <a target="_blank" href="<?php echo 'http://www.twitter.com/'.$candidate->getTwitter() ?>">
                <?php echo $candidate->getTwitter() ? '@'.$candidate->getTwitter() : '' ?>
            </a>
        </td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Facebook:</th>
        <td class="span-18 last">
            <a target="_blank" href="<?php echo $candidate->getFacebook() ?>">
                <?php echo $candidate->getFacebook() ?>
            </a>
        </td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Sitio Web:</th>
        <td class="span-18 last">
            <a target="_blank" href="<?php echo $candidate->getWebPage() ?>">
                <?php echo $candidate->getWebPage() ?>
            </a>
        </td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Activo:</th>
        <td class="span-18 last"><?php echo $candidate->getActive() ? 
                '<span class="ui-icon ui-icon-check"></span>' : '<span class="ui-icon ui-icon-closethick"></span>' ?></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Categorías a las que es candidato:</th>
        <td class="span-18 last">
            <ul>
                <?php foreach ($candidate->getCategories() as $category): ?>
                    <li>
                        <a href="<?php echo url_for('category_show', $category)?>"><?php echo $category?></a>
                    </li>
                <?php endforeach; ?>
            </ul>
        </td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Fecha de Creación:</th>
        <td class="span-18 last"><?php echo $candidate->getDateTimeObject('created_at')->format('m/d/Y') ?></td>
    </tr>
    <tr class="span-24">
        <th class="span-6">Ultima actualización:</th>
        <td class="span-18 last"><?php echo $candidate->getDateTimeObject('updated_at')->format('m/d/Y'); ?></td>
    </tr>
</table>

<hr />

<a class="back" href="<?php echo url_for('candidate') ?>">Regresar</a>
&nbsp;
<a class="edit" href="<?php echo url_for('candidate_edit', $candidate) ?>">Editar</a>
&nbsp;
<a class="show-nominations" href="<?php echo url_for('candidate_show_nominations', $candidate) ?>">Nominaciones</a>
